import React, { Component } from 'react'
import { NavLink } from 'react-router-dom'
export default class MyNavLink extends Component {
    render() {
        console.log(this.props)
        return (
            //  3_1.封装NavLink 
            // <NavLink activeClassName='origin' className="list-group-item" {...this.props}>{this.props.title}</NavLink>
            //  3_2.封装NavLink  父组件中props中会生成一个children的键，里面保存其子标签元素，children: "Home"
            <NavLink activeClassName='origin' className="list-group-item" {...this.props}/>
        )
    }
}
